//退出登录
document.getElementById("confirmBtn").addEventListener('tap', function() {
    var btnArray = ['取消', '确认'];
    mui.confirm('是否要退出登录？', '', btnArray, function(e) {
        if (e.index == 1) {
            $.ajax({
                url:'/user/userLogout.json',
                dataType:'json',
                data:{
                    token:getItem('token'),
                    companyCode:getItem('companyCode'),
                },
                success:function(data){
                    removeItem('token');
                    window.location.href="index.html?companyCode="+getItem('companyCode');
                }
            })
        } else {

        }
    })
});

//地址
document.getElementById('setUrl').addEventListener('tap',function () {
    setItem('setUrl',window.location.href);
})